Exceptionally Safe Futures

نویسندگان

  • Armand Navabi
  • Suresh Jagannathan
چکیده

A future is a well-known programming construct used to introduce concurrency to sequential programs. Computations annotated as futures are executed asynchronously and run concurrently with their continuations. Typically, futures are not transparent annotations: a program with futures need not produce the same result as the sequential program from which it was derived. Safe futures guarantee a future-annotated program produce the same result as its sequential counterpart. Ensuring safety is especially challenging in the presence of constructs such as exceptions that permit the expression of non-local control-flow. For example, a future may raise an exception whose handler is in its continuation. To ensure safety, we must guarantee the continuation does not discard this handler regardless of the continuation’s own internal control-flow (e.g. exceptions it raises or futures it spawns). In this paper, we present a formulation of safe futures for a higher-order functional language with first-class exceptions. Safety can be guaranteed dynamically by stalling the execution of a continuation that has an exception handler potentially required by its future until the future completes. To enable greater concurrency, we develop a static analysis and instrumentation and formalize the runtime behavior for instrumented programs that allows execution to discard handlers precisely when it is safe to do so.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Isolating Determinism in Multi-threaded Programs

Futures are a program abstraction that express a simple form of fork-join parallelism. The expression future (e) declares that e can be evaluated concurrently with the future’s continuation. Safe-futures provide additional deterministic guarantees, ensuring that all data dependencies found in the original (non-future annotated) version are respected. In this paper, we present a dynamic analysis...

متن کامل

A Concurrent Lambda Calculus with Futures

We introdu e a new on urrent lambda al ulus with futures, (fut), to model the operational semanti s of onurrent extensions of ML. (fut) an safely express a variety of high-level on urren y onstru ts, in luding hannels, semaphores, or ports. Safe implementations of these onstru ts in (fut) annot be orrupted in any well-typed ontext. We prove safety on basis of a linear type system.

متن کامل

Transactional Tasks: Parallelism in Software Transactions

Many programming languages, such as Clojure, Scala, and Haskell, support different concurrency models. In practice these models are often combined, however the semantics of the combinations are not always well-defined. In this paper, we study the combination of futures and Software Transactional Memory. Currently, futures created within a transaction cannot access the transactional state safely...

متن کامل

Behavioral interface description of an object-oriented language with futures and promises

This paper formalizes the observable interface behavior of an concurrent, object-oriented language with futures and promises. The calculus captures the core of Creol, a language, featuring in particular asynchronous method calls and, since recently, first-class futures. The focus of the paper are open systems and we formally characterize their behavior in terms of interactions at the interface ...

متن کامل

IGBT Press-packs for the industrial market

We present a newly developed 4500 V and 2000 A Press-Pack IGBT module for power transmission and industrial voltage drives applications. The module employs SPT IGBT chips with exceptionally low losses and high Safe Operating Area (SOA). The use of SPT IGBT chips in this Press Pack IGBT module allows for higher power densities and the package provides a highly flexible modular platform with very...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009